package com.tensquare.qa.client;

import com.tensquare.qa.client.impl.BaseClientImpl;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by DUZEYU on 2018/12/29.
 * 问答调base
 */

@FeignClient(value = "tensquare-base",fallback = BaseClientImpl.class)//项目名 不能有下划线
public interface BaseClient {
    /**
     * 我要调用人家在我这里创建一个就行
     */
    // 加上调用项目访问的前缀  lable 问答的路径前缀
    @RequestMapping(value = "/label/{labelId}",method = RequestMethod.GET)
    public Result findById(@PathVariable("labelId") String labelId);
}
